﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RFIDStockManagement.IDAL;
using System.Data;
using System.Data.Common;

namespace RFIDStockManagement.DAL
{
    public class IOStockAccess : IIOStock
    {
        public DataTable GetItemUnit()
        {
            DbHelper helper = new DbHelper();

            string sql = @"SELECT item.FID FItemID,item.FName,item.FNumber,item.FStockID,item.FStockPlaceID,place.FName FStockPlaceName,unit.FID FUnitID,unit.FName FUnitName FROM rfid_Item item 
INNER JOIN rfid_Measure unit ON item.FMeasureGroupID=unit.FMeasureGroupID
INNER JOIN rfid_StockPlace place ON item.FStockPlaceID=place.FID";
            DbCommand comm = helper.GetSqlStringCommand(sql);

            return helper.ExecuteDataTable(comm);
        }
    }
}
